package cn.rui.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 徽州大都督
 * @date 2021/05/13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tbl_user")
public class User implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer id;

    private String uuid;

    private String username;

    private String password;

    private String relName;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateTime;

    @TableLogic
    private Integer deleted;

    @TableField(exist = false)
    private Integer state;

    private String token;

    //是否在线
    @TableField(exist = false)
    private Integer isLogin;

    //记住密码
    @TableField(exist = false)
    private Boolean checked;
}
